www.gusucode.com > 茶都拼客网全功能版 8 > 茶都拼客网全功能版 8.8源码程序/teasdxmccom/茶都拼客网V8.8(全功能,无限制,完全开源)/admin/News_list.asp

    <!--#include file="../Ku_inc/Ku_sql.asp"-->
<!--#include file="../Ku_inc/Ku_config.asp"-->
<!--#include file="Ku_conn.asp"-->
<!--#include file="../Ku_inc/Ku_md5.asp"-->
<!--#include file="../Ku_inc/inc.asp"-->
<!-- #include file="Session.asp"-->
<html>
<head>
<title>内容列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="include/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
input{
	height:22px;
	border:1px solid #BEBEBE;
	background-color:#FFF;
	padding-top: 2px;
	padding-right: 8px;
	padding-bottom: 0pt;
	padding-left: 3px;
}
-->
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
function checkall(form)
{
for (var i=0;i<form.elements.length;i++)    {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked; 
}
}
</script>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  <td height="30" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE"><b> 当前栏目:&gt; </b>新闻管理</td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td width="30%">
      <input class="input_back" type="button" name="Submit" value="新闻分类/添加新闻"onclick="location.href='news_kind.asp'"/>      
	<input class="input_back" type="button" name="Submit0" value="管理首页"onclick="location.href='main.asp'"/></td>
    <td width="22%">
       </td>
<form method="post" action="?" name="myKeyword">
    <td width="46%">
    <div align="right">搜索:
        <input name="myKeyword" type="text" id="myKeyword" value="" style="WIDTH:30%" maxlength="50">
        <input type="submit" name="Submit" value="搜索(S)" class="input_back">
    </div>
    </td>
    </form>
  </tr>

<form action="deal_news.asp?action=del" method=post name="thisform">
<tr>
<td colspan="3"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="cecfce">
<tr>
<td width="30" bgcolor="e7ebef" style="font-weight: bold"><div align="center">操作</div></td>  
<td height="25" bgcolor="e7ebef" style="font-weight: bold">标题</td>
<td width="125" bgcolor="e7ebef" style="font-weight: bold"><div align="center">
	新闻分类</div></td>
<td width="125" bgcolor="e7ebef" style="font-weight: bold"><div align="center">日期</div></td>
<td width="80" bgcolor="e7ebef" style="font-weight: bold"><div align="center">操作</div></td>
<%
	set rs=server.createobject("adodb.recordset")
	if request("id")="" then
	sql="select * from ku_news where 1=1 "
	else
	sql="select * from ku_news where class="&request("id")&" "
	end if
	
	if not (Trim(Request("pageID"))="" or isempty(Trim(Request("pageID"))) ) then
		sql=sql&" and pageID="&clng(Request("pageID"))&""
	end if

	if not (Trim(Request("myKeyword"))="" or isempty(Trim(Request("myKeyword"))) ) then
		sql=sql&" and (title like '%" & Trim(Request("myKeyword")) & "%' or content like  '%" & Trim(Request("myKeyword")) & "%')"
	end if
	
	sql=sql&" order by dateandtime desc"
	'response.write sql
	'response.End
	rs.open sql,conn,1,1
	
	dim a
	Set a=New PageList
	listLimit=15
	'模拟分页一页显示分页数
	pageLists=5
	'设置分页参数

If rs.BOF or rs.EOF Then 
%>
</tr>
<tr bgcolor="#C6E3F4">
  <td height="28" colspan="6" align="center" bgcolor="#FFFFFF">暂无记录!</td>
  </tr>
<%
else

'分页循环开始
totalList=rs.recordcount
a.InitPara=array(totalList,listLimit,pageLists)
a.PageList()
rs.pagesize=listLimit
page = request("page")
If page="" Then
	page=1
End If
rs.absolutepage = page
for i=1 to rs.pagesize
%>
<tr bgcolor="#ffffff" onMouseOver='this.style.backgroundColor="#F6f6f6"' 
onMouseOut='this.style.backgroundColor="#FAFAFA"'>
<td height="28" align="center"><input type="checkbox" name="ID" value="<%=Trim(rs("ID"))%>"></td>
<td><%=Trim(rs("title"))%>..  <%if rs("shenhe")=0 then%>[<a href="Deal_news.asp?action=shenhenews&id=<%=rs("id")%>"><font color="#FF0000">未审核</font></a>]<%end if%></td>
<%
cid=rs("class")
set kurs=server.createobject("adodb.recordset")
    csql="select * from ku_newskind where id="&cid
    kurs.open csql,conn,1,3
%>
<% do while not kurs.eof%>
<td align="center"><%=kurs("name")%></td>

<td align="center"><%=Trim(rs("dateandtime"))%></td>
<td align="center"><a href="deal_news.asp?action=tisheng&ID=<%=Trim(rs("ID"))%>">上移</a> <a href="News_edit.asp?class=<%=kurs("id")%>&id=<%=rs("id")%>">编辑</a></td>

<%
   kurs.movenext
   loop
   kurs.close
   
%>	
</tr>
<%
rs.movenext
if rs.eof then exit for
next

end if
%>
</table></td>
  </tr>
  <tr>
    <td colspan="3"><div align="left">
&nbsp;&nbsp;<input type=checkbox name=chkall value=on onClick="checkall(this.form)">全部选中<input type=submit name=action onClick="{if(confirm('确定删除选定的纪录吗?')){this.document.thisform.submit();return true;}return false;}" value="批量删除(D)" class="input_back">
    </div></td>
  </tr>
  <tr>
    <td colspan="3"><%=a.PageInfo%></td>
  </tr>
  <tr>
    <td colspan="3"></td>
  </tr>
 </form>
</table>
<%
rs.close
set rs=nohing
%>
<hr/>
<br>

<p align="center"><!-- #include file="Ku_bottom.asp"--></p>
</body>
</html>